/*
 * Gpio.h
 *
 * Created on: $(date:yyyy-MM-dd)
 * Author: $(user)
 */

#pragma once

// Add your function declarations here

#include <iostream>
#include <cstdlib>  
#include <string>
#include <unistd.h>
#include <fcntl.h>  //define O_WRONLY and O_RDONLY 

using namespace std;

#define SYSFS_GPIO_EXPORT           "/sys/class/gpio/export" 
#define SYSFS_GPIO_RST_VAL_H        "1"
#define SYSFS_GPIO_RST_VAL_L        "0"

class Gpio{
    private:
        int fd;
        int statue;
        int in_fd;
        string m_num;

    public:
        Gpio(string num);
        ~Gpio();
        int gpioOpen();
        int gpioClose();
        int getStatus();

};